package homework.api.day01._cp;

public class StringBuilderApiDemo {
    public static void main(String[] args) {
        String str = "qwer";
        StringBuilder builder = new StringBuilder(str);
        StringBuilder builder1 = new StringBuilder("qwer");

        //增加，+
        builder.append("789654");
        System.out.println(builder);

        //删除
        builder.delete(2,4);
        System.out.println(builder);

        //替换
        builder.replace(7,20,"zxcv");
        System.out.println(builder);

        //插入
        builder.insert(1,"999");
        System.out.println(builder);

    }
}
